import yaml

def red_ymal(yamlPath,rw):
    f=open(yamlPath,rw,encoding='utf-8')
    '''先读取文件'''
    c=f.read()
    '''文件转化为yaml文件'''
    d=yaml.load(c,Loader=yaml.SafeLoader)

    return d
